package net.sureon.dao;

import java.util.Date;
import java.util.List;

/**
 * @author Administrator
 * 
 */
public interface DailyTimingDAO {
	public long insertDailyTiming(DailyTiming dailyTiming);

	public void deleteDailyTiming(long companyID, long dailyTimingID);

	public DailyTiming getDailyTimingByID(long companyId, long dailyTimingID);

	/**
	 * 用户未审核的申请(Pending)
	 */
	public List<DailyTiming> getDailyTimingByUserNotReview(long companyID,
			long userID, int skipResults, int maxResults);

	/**
	 * 用户审核过的申请（包括审核不通过和审核通过/NotApproved,Approved）
	 */
	public List<DailyTiming> getDailyTimingByUserReview(long companyID,
			long userID, int skipResults, int maxResults);

	/**
	 * 未审核的下属申请(Pending)
	 */

	public List<DailyTiming> getDailyTimingByGroupNotReview(long companyID, List<Long> idsAsList, int skipResults, int maxResults);
	
	/**
	 * 审核过的下属申请（包括 NotApproved和Approved）
	 */
	
	public List<DailyTiming> getDailyTimingByGroupReview(long companyID, List<Long> idsAsList, int skipResults, int maxResults);

	/**
	 * 修改考勤的相关信息
	 */
	public int updateDailyTiming(long companyID, long dailyTimingID, java.util.Date reviewDate,
			long reviewedBy, String reviewNote, String status);

	/**
	 * 取得个人考勤统计
	 * @param companyID 公司编号
	 * @param userID 员工编号
	 * @return 分组信息
	 */
	public List<DailyTimingStatistic> getDailyTimingStatisticInfo(long companyID, long userID);
	
	/**
	 * 下属的考勤统计
	 * @param companyID 公司编号
	 * @param groupID 所属组编号
	 * @return 全部的考勤信息
	 */
	public List<DailyTimingStatistic> getDailyTimingStatisticInfoByGroup(long companyID, List<Long> idsAsList) ;
	
	public List<DailyTimingStatistic> getDailyTimingStatisticInfoByGroup(long companyID, List<Long> idsAsList, Date startDate, Date endDate) ;
	
	/**
	 * 管理员对整个公司的考勤统计
	 * @param companyID
	 * @param groupID
	 * @return
	 */
	
	public DailyTiming getDailyTimingByWorkDate(long companyID, long userID, java.util.Date workDate);
	
	/**
	 * 更新考勤相关信息（编辑）
	 * @param dailyTiming
	 * @return
	 */
	public int editDailyTiming(long companyID, long dailyTimingID, float workTime, float overTime, float vocationTime, float leaveTime, String workSummary, java.util.Date submitDate, String status);
}
